<?php
require_once (__DIR__ . "/../../models/Users.php");
$results = Users::GetAll();
?>
				<a href="<?= "$rootUrl/../W/Users/create" ?>"><b>Add...</b></a>
				<table class="table table-bordered table-condensed table-hover table-striped">
					<tr>
						<th>First Name</th><th>Last Name</th><th>User Type</th><th>Actions</th>
					</tr>
					
					<?php while($row = $results->fetch_assoc()): ?>
						<tr>
							<td><?php echo $row['firstName']; ?></td> <td><?php echo $row['lastName'];?> </td><td><?php echo Users::getUserType($row['userType']);?> </td>
							<td>
								<a href="<?= "$rootUrl/../W/Users/details/$row[id]" ?>">Details</a>
								<a href="<?= "$rootUrl/../W/Users/edit/$row[id]" ?>">Edit</a>
								<a href="<?= "$rootUrl/../W/Users/delete/$row[id]" ?>">Delete</a>
							</td>					
						</tr>
					<?php endwhile; ?>
					
				</table>